<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<body>
    <div id="myExamsList">
        <div id="exam_filter">
            <div>
               <span>
                   <b>选择时间：</b>
                   <select id="student_exam_select_time" onchange="studentExam.selectMyExams()">
                        <option value="1">当天</option>
                        <option value="2">本周</option>
                        <option value="3">本月</option>
                   </select>
               </span>
            </div>
        </div>
        <div id="exam_table">
            <table class="table table-hover">
                <thead>
                    <tr>
                        <th width="5%">序号</th>
                        <th width="30%">考试名称</th>
                        <th width="15%">考试时间</th>
                        <th width="15%">考试状态</th>
                        <th width="15%">参考状态</th>
                        <th width="20%">操作</th>
                    </tr>
                </thead>
                <tbody>
                    <th:block th:if="${exams==null || exams.size()==0}">
                        <tr>
                            <td colspan="6" align="center">没有考试记录</td>
                        </tr>
                    </th:block>
                    <th:block th:if="${exams!=null && exams.size()!=0}">
                        <tr th:each="exam:${exams}">
                            <td th:text="${examStat.index+1}"></td>
                            <td th:text="${exam.name}"></td>
                            <th:block th:if="${exam.duration==null}">
                                <td th:text="${#strings.replace(exam.start_time,'T',' ')+'-'+#strings.replace(exam.end_time,'T',' ')}"></td>
                            </th:block>
                            <th:block th:if="${exam.duration!=null}">
                                <td th:text="${exam.duration}"></td>
                            </th:block>
                            <td th:text="${exam.exam_status}"></td>
                            <td th:text="${exam.student_status}"></td>
                            <td><a href="javascript:void(0)" th:onclick="studentExam.intoExam([[${exam.id}]])">进入考试</a></td>
                        </tr>
                    </th:block>
                </tbody>
            </table>
        </div>
    </div>
</body>
</html>